#ifndef HISTORYRECORD_H
#define HISTORYRECORD_H

#include <QDateTime>
#include <QString>
#include <QDebug>

class HistoryRecord
{
public:
    HistoryRecord(QString url);

    HistoryRecord();

    const QDateTime dateTime(){return m_datetime;}
    const QString url(){return this->m_url;}

    QString dateTimeString(){return m_datetime.toString("yyyy-MM-dd-hh-mm-ss");}
    QString historyString(){
        return dateTimeString() + "#" + m_url;}

    void load(QString str);

    void setDatetime(const QDateTime &datetime);

    void setUrl(const QString &url);

public:
    QDateTime m_datetime;
    QString m_url;

};

#endif // HISTORYRECORD_H
